package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstOperationLogDTO;
import com.financing.wap.dao.IDstOperationLogDao;
import com.financing.wap.common.SqlName;
/**
 * dst_operation_log  
 * 文章操作流水 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstOperationLogDao")
public class DstOperationLogDaoImpl extends BaseDaoImpl<DstOperationLogDTO, java.lang.Integer> implements IDstOperationLogDao {


	@Override
	public int insert(DstOperationLogDTO dstOperationLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstOperationLogSql.insert, dstOperationLog);
	}

	@Override
	public void update(DstOperationLogDTO dstOperationLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstOperationLogSql.update, dstOperationLog);
	}

	@Override
	public void updateForce(DstOperationLogDTO dstOperationLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstOperationLogSql.updateForce, dstOperationLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstOperationLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstOperationLogDTO> queryList(DstOperationLogDTO dstOperationLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstOperationLogSql.queryList, dstOperationLog);
	}

	@Override
	public int queryListCount(DstOperationLogDTO dstOperationLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstOperationLogSql.queryListCount, dstOperationLog);
	}

	@Override
	public DstOperationLogDTO loadById(Integer id) throws SQLException {
		return  (DstOperationLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstOperationLogSql.loadById,id);
	}

	@Override
	public Class<DstOperationLogDTO> getEntityClass() {
		return DstOperationLogDTO.class;
	}
 	
}
